import request from '@/utils/request'

export function CRMGetProjectUsers(args) {
  return request({
    url: `/crm/api/crmgetprojectusers/${args && ('?' + args) || ''}`,
    method: 'get'
  })
}

export function AddProjectUser(data) {
  return request({
    url: '/crm/api/crmprojectuser/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    data: data
  })
}

export function ModifyProjectUser(id, data) {
  return request({
    url: `/crm/api/crmprojectuser/${id || ''}`,
    headers: { 'content-type': 'application/json' },
    method: 'put',
    data: JSON.stringify(data)
  })
}

export function DeleteProjectUser(id, data) {
  return request({
    url: `/crm/api/crmprojectuser/${id || ''}`,
    method: 'delete',
    data: JSON.stringify(data)
  })
}

export function Translate(data) {
  return request({
    url: '/crm/api/crmtranslate/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    data: data
  })
}
